﻿using System;

namespace VsTortoiseSVN
{
    public static class Globals
    {
        /// <summary>
        /// Specifies the VsTortoise build number.
        /// </summary>
        public const int Build = 29;

        /// <summary>
        /// Specifies whether VsTortoise is a beta version.
        /// </summary>
        public const bool Beta = true;

        /// <summary>
        /// Specifies whether VsTortoise is an alpha version.
        /// </summary>
        public const bool Alpha = false;

        /// <summary>
        /// Gets a string containing the VsTortoise version and beta information.
        /// </summary>
        public static string VersionString
        {
            get
            {
                return string.Format("{0}{1}", Build, Beta ? " Beta": Alpha ? " Alpha" : "");
            }
        }

        /// <summary>
        /// Gets the full application title.
        /// </summary>
        public static string AppTitle
        {
            get
            {
                return string.Format("VsTortoise {0}", VersionString);
            }
        }

        /// <summary>
        /// Gets/sets the DTE instance of the current Visual Studio Process.
        /// This must be one of the very first tasks performed during addin initialization.
        /// </summary>
        public static EnvDTE80.DTE2 DTE { get; set; }


        private static void CheckStaticAssertions()
        {
            // generate compile error when I broke alpha/beta flags
            byte wrongAlphaBetaFlags = Alpha && Beta ? -1 : 0;
        }
    }
}
